﻿using System;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YArchitech.HVAC
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class SelectAll : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			UIDocument activeUIDocument = commandData.Application.ActiveUIDocument;
			Application application = commandData.Application.Application;
			Result result;
			try
			{
				result = RevitTools.SelectAll(commandData);
			}
			catch (Exception ex)
			{
				ex.ToString();
				result = Autodesk.Revit.UI.Result.Cancelled;
			}
			return result;
		}
	}
}
